package com.bw.test;

import com.bw.entity.Book;
import com.bw.service.BookService;
import com.bw.service.CarService;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class testCar {




    @Test
    public void test00(){


        Book book = new Book();
        System.out.println(book.getClass()); // 打印这个对象的类名
    }
    @Test
    public void test1() throws InterruptedException {

        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-ioc.xml");
        // 从容器中获取一个service
        CarService carService = applicationContext.getBean(CarService.class);
        System.out.println(carService.getClass());
        carService.updateCar(null);




    }
}
